package com.itheima.crm.service;

import java.util.List;

import javax.ws.rs.Consumes;
import javax.ws.rs.GET;
import javax.ws.rs.POST;
import javax.ws.rs.PUT;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.QueryParam;

import com.itheima.crm.domain.Customer;

public interface CustomerService {
	// 查询所有未关联客户列表
	@Path("/noassociationcustomers")
	@GET
	@Produces({"application/xml","application/json"})
	public List<Customer> findNoAssociationCustomer();
	
	// 已经关联到指定定区的客户列表
	@Path("/associationcustomers")
	@GET
	@Produces({"application/xml","application/json"})
	public List<Customer> findAssociationCustomer(@QueryParam("fixedAreaId")String fixedAreaId);
	
	// 将客户关联到定区上 ， 将所有客户id 拼成字符串 1,2,3，使用@QueryParam实现
	@Path("/associationCustomersToFixedArea")
	@PUT
	@Consumes({"application/xml","application/json"})
	public void associationCustomersToFixedArea(@QueryParam("customerStr")String customerStr, @QueryParam("fixedAreaId")String fixedAreaId);
	
	@Path("/customerSignUp")
	@POST
	@Consumes({"application/xml","application/json"})
	public void customerSignUp(Customer customer);
	
	
	@Path("/customerCheckActiveCode")
	@GET
	@Consumes({"application/xml","application/json"})
	@Produces({"application/xml","application/json"})
	public Customer customerCheckActiveCode(@QueryParam("telephone")String telephone);
	
	@Path("/customerActive")
	@PUT
	@Consumes({"application/xml","application/json"})
	public void customerActive(@QueryParam("telephone")String telephone);
	
	@Path("/customerLogin")
	@GET
	@Consumes({"application/xml","application/json"})
	@Produces({"application/xml","application/json"})
	public Customer customerLogin(@QueryParam("telephone")String telephone,@QueryParam("password")String password);
	
	@Path("/findById")
	@GET
	@Consumes({"application/xml","application/json"})
	@Produces({"application/xml","application/json"})
	public Customer findById(@QueryParam("id")String id);
}
